package 笔试;


/**
 * @author:谢君臣
 * @Date:2021/8/4-19:57
 * @version:1.0
 * @function:
 */
import java.util.Scanner;
public class 质数分解 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        factor(num);
        decompose(num);
    }

    private static void factor(int num) {
        int temp = num;
        StringBuilder res = new StringBuilder(num+"=");
        for (int i = 2; i <= Math.sqrt(temp); i++) {
            if (num%i==0){
                res.append(i+"*");
                num/=i;
                i--;
            }
        }
        System.out.println(res.substring(0,res.length()-1));
    }
    //因数分解函数
    private static void decompose(int n)
    {
        System.out.print(n+"=");
        for(int i=2;i<=n;i++)
        {
            while (n%i==0&&n!=i)
            {
                n/=i;
                System.out.print(i+"*");
            }
            if(n==i){
                System.out.print(i);
                break;
            }
        }
    }
}
